﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Soul
{
    class Program
    {
        static void Main(string[] args)
        {
            GameBase.Network.GamePacketKeyEx ex = new GameBase.Network.GamePacketKeyEx();
            ex.InitKey();
            byte[] a = { 55, 0, 236, 3, 255, 255, 255, 0, 53, 8, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 65, 76, 76, 85, 83, 69, 82, 83, 0, 9, 65, 78, 83, 87, 69, 82, 95, 79, 75, 0, 0, 0, 66, 0, 236, 3, 255, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 20, 188, 198, 183, 209, 192, 224, 208, 205, 163, 186, 211, 192, 190, 195, 195, 226, 183, 209, 161, 163, 0, 0, 0, 32, 0, 244, 7, 243, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 0, 247, 3, 183, 4, 0, 0, 136, 1, 0, 0, 44, 0, 249, 3, 12, 56, 20, 0, 4, 0, 0, 0, 16, 0, 0, 0, 65, 0, 0, 0, 34, 0, 0, 0, 27, 0, 0, 0, 15, 0, 0, 0, 89, 0, 0, 0, 14, 0, 0, 0, 91, 0, 0, 0, 4, 1, 238, 3, 12, 56, 20, 0, 241, 73, 2, 0, 101, 0, 0, 0, 181, 10, 0, 0, 0, 0, 0, 0, 223, 219, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, 0, 0, 0, 65, 0, 0, 0, 27, 0, 100, 0, 89, 0, 91, 0, 0, 0, 122, 3, 122, 3, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 10, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 102, 101, 111, 119, 102, 113, 101, 119, 2, 206, 222, 0, 0, 0, 44, 0, 249, 3, 12, 56, 20, 0, 4, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 232, 3, 0, 0, 3, 0, 0, 0, 28, 7, 0, 0, 37, 0, 0, 0, 100, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 46, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 60, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 14, 189, 161, 191, 181, 211, 206, 207, 183, 214, 210, 184, 230, 163, 186, 0, 0, 0, 102, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 56, 181, 214, 214, 198, 178, 187, 193, 188, 211, 206, 207, 183, 163, 172, 190, 220, 190, 248, 181, 193, 176, 230, 211, 206, 207, 183, 163, 172, 215, 162, 210, 226, 215, 212, 206, 210, 177, 163, 187, 164, 163, 172, 189, 247, 183, 192, 202, 220, 198, 173, 201, 207, 181, 177, 163, 187, 0, 0, 0, 102, 0, 236, 3, 0, 255, 255, 0, 208, 7, 0, 0, 66, 3, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 102, 101, 111, 119, 102, 113, 101, 119, 0, 56, 202, 202, 182, 200, 211, 206, 207, 183, 210, 230, 196, 212, 163, 172, 179, 193, 195, 212, 211, 206, 207, 183, 201, 203, 201, 237, 163, 172, 186, 207, 192, 237, 176, 178, 197, 197, 202, 177, 188, 228, 163, 172, 207, 237, 202, 220, 189, 161, 191, 181, 201, 250, 187, 238, 161, 163, 0, 0, 0, 36, 0, 251, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 101, 111, 119, 102, 113, 101, 119, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 244, 3, 12, 56, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 249, 3, 12, 56, 20, 0, 1, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 12, 0, 247, 3, 0, 0, 0, 0, 135, 1, 0, 0, 28, 0, 242, 3, 45, 43, 180, 85, 12, 56, 20, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 38, 0, 0, 16, 0, 99, 4, 0, 0, 0, 0, 49, 43, 180, 85, 128, 143, 255, 255, 28, 0, 242, 3, 49, 43, 180, 85, 232, 3, 0, 0, 3, 1, 82, 1, 0, 0, 0, 0, 232, 3, 0, 0, 69, 37, 0, 0, 8, 0, 161, 4, 113, 18, 114, 2, 28, 0, 242, 3, 49, 43, 180, 85, 12, 56, 20, 0, 3, 1, 82, 1, 0, 0, 0, 0, 255, 255, 255, 255, 95, 37, 0, 0, 20, 0, 86, 4, 232, 3, 0, 0, 232, 3, 0, 0, 0, 0, 32, 0, 128, 0, 18, 0, 32, 0, 238, 7, 135, 76, 0, 0, 251, 0, 101, 1, 70, 253, 2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 21, 8, 38, 111, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 1, 0, 0, 251, 0, 93, 1, 0, 0, 144, 1, 121, 0, 0, 0, 80, 195, 0, 0, 80, 195, 0, 0, 0, 0, 0, 0, 32, 0, 238, 7, 15, 4, 0, 0, 11, 1, 101, 1, 150, 40, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 238, 7, 131, 76, 0, 0, 7, 1, 90, 1, 37, 253, 2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 238, 7, 197, 76, 0, 0, 16, 1, 83, 1, 220, 240, 10, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32, 0, 238, 7, 196, 76, 0, 0, 17, 1, 93, 1, 112, 228, 10, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 32, 0, 238, 7, 212, 155, 1, 0, 18, 1, 86, 1, 224, 231, 10, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 77, 4, 0, 26, 14, 0, 0, 0, 0, 0, 14, 1, 92, 1, 6, 0, 4, 0, 11, 0, 0, 0, 1, 0, 0, 0, 72, 0, 21, 8, 59, 111, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 1, 0, 0, 26, 1, 96, 1, 0, 0, 144, 1, 121, 0, 0, 0, 80, 195, 0, 0, 80, 195, 0, 0, 5, 0, 0, 0, 28, 0, 244, 7, 109, 0, 5, 0, 12, 56, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 249, 3, 12, 56, 20, 0, 1, 0, 0, 0, 36, 0, 0, 0, 0, 4, 0, 0, 48, 0, 103, 4, 12, 56, 20, 0, 64, 43, 180, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 247, 3, 1, 0, 0, 0, 128, 0, 0, 0, 28, 0, 244, 7, 223, 0, 5, 0, 197, 121, 51, 1, 35, 62, 3, 0, 120, 132, 60, 62, 112, 65, 94, 243, 1, 0, 0, 0, 18, 0, 17, 8, 1, 0, 49, 8, 53, 0, 4, 25, 10, 0, 225, 0, 122, 12 };
            int tick = System.Environment.TickCount;
            for (int i = 0; i < 30000; i++)
            {
                ex.EncodePacket(ref a, a.Length);
                ex.DecodePacket(ref a,a.Length);
            }
            tick = System.Environment.TickCount - tick;
            Console.WriteLine(tick.ToString());
            Console.ReadLine();
        }
    }
}
